package rhc.taskSchedule.task.impl;

import org.springframework.stereotype.Service;

import rhc.taskSchedule.SingleInstanceComponent;
import rhc.taskSchedule.entity.Task;
import rhc.taskSchedule.task.ScheduleTaskInnerService;

@Service
public class ScheduleTaskInnerServiceImpl extends SingleInstanceComponent implements ScheduleTaskInnerService {

	@Override
	public Task createScheduleTask(String taskName, String sourceTaskId, Integer runNodeCount, String taskTypeId)
			throws Exception {
		
		Task task=new Task();
		task.setTaskName(taskName);
		task.setSourceTaskId(sourceTaskId);
		task.setRunNodeNumber(runNodeCount);
		task.setTaskTypeId(taskTypeId);
		
		superDao.addOneT(task);
		
		return task;
	}

}
